cmake_minimum_required(VERSION 3.14)

include(cmake/SparkWithGit.cmake)
spark_include(SparkCMakeInfoBeforeConfig.cmake)

project(infinit-robot LANGUAGES CXX VERSION 0.0.1)

spark_initialize_modules()

# 资源文件路径
set(QRC_SOURCES "")

##
# [Desktop Entry] For Linux 
# 内容默认应用名称: Name= 应与项目名称相同
spark_desktop_macros(
    # 应用名称: Name=
    "Infinite Robot"
    # 应用名称: Name[zh_CN]=
    "无限宇宙桌面小组件"
    # 应用说明: Comment=
    "基于 PyQt5 的桌面小组件"
    # 应用类型: Type=
    "Application"
    # 执行程序: Exec=
    "/opt/apps/infinit-robot/infinit-robot"
    # 图标路径: Icon=
    "infinit-robot"
    # 应用分类: Categories=
    "Utility"
    # MIME类型: MimeType=
)
install(FILES ${SPARK_DESKTOP_FILE}
    DESTINATION /usr/share/applications
    RENAME infinit-robot.desktop
)
install(DIRECTORY dist/infinit-robot/
    DESTINATION /opt/apps/infinit-robot
)
install(PROGRAMS dist/infinit-robot/infinit-robot
    DESTINATION /opt/apps/infinit-robot
)


install(FILES
    festivalicon.png
    DESTINATION /usr/share/icons/hicolor/512x512/apps
    RENAME infinit-robot.png
)
install(FILES festivals.json
    DESTINATION /opt/apps/infinit-robot
)
install(DIRECTORY images
    DESTINATION /opt/apps/infinit-robot
)

##
# [deb] For Linux(with dpkg)
# 注释行(使用方式)
add_package_descript(cmake/spark-deb-package.descript)